package demo.pattern.singleton;

/**
 * @Author: yu.zhou
 * @DateTime: 2023/01/04 13:40 饿汉单例demo
 *
 * <p>因为在初始的时候就被创建成功了,因此它是安全的</p>
 */
public class StavingSingleton {

    private static final StavingSingleton instance = new StavingSingleton();

    private StavingSingleton() {
    }

    public StavingSingleton getInstance() {
        return instance;
    }
}
